package com.coco.controller;

import com.coco.util.DbUtil;
import com.google.common.base.CaseFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class IndexController {


    @PostMapping("/index")
    public String index(@RequestBody List<String> tableList) throws Exception {
        CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,"test_data");
        CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL,"test_data");
        //DbUtil.getTableField();
        return "success";
    }

    @GetMapping("/test")
    public String test() throws Exception{
        DbUtil dbUtil = new DbUtil("","","");
        dbUtil.getTableField("com.coco");
        return "success";
    }
}
